package cn.com.nes.site.entity.bo.callcenter;

import cn.com.nes.mybatis.callcenter.entity.EquipmentInfo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 设备数据保存模型
 */
@Data
public class EquipmentSaveBo {

    /**
     * 设备id
     */
    private Long id;

    /**
     * 设备id
     */
    private String sbId;

    /**
     * 房屋id
     */
    private String ddId;

    /**
     * 房屋id
     */
    private Long houseId;

    /**
     * 企业id
     */
    private Long companyId;

    /**
     * 设备类型id
     */
    private Long equipmentTypeId;

    /**
     * 设备类型ID
     */
    private String sbLxid;

    /**
     * 设备序列号
     */
    private String equipmentNumber;

    /**
     * 传输序列号
     */
    private String transmitNumber;

    /**
     * 机组安装位置
     */
    private String installationSite;

    /**
     * 照片url;根据";"隔开
     */
    private String images;

    /**
     * 纬度
     */
    private BigDecimal longitude;

    /**
     * 经度
     */
    private BigDecimal latitude;

    /**
     * 逻辑删除:   1 表示删除，0 表示未删除。
     */
    private Integer delete;

    /**
     * 创建时间
     */
    private Long gmtCreate;

    /**
     * 修改时间
     */
    private Long gmtModified;

    /**
     * 联系人
     */
    private String contacts;

    /**
     * 联系电话
     */
    private String contactstel;

    /**
     * 地址
     */
    private String address;

    /**
     * 公司ID
     */
    private Long equipmentCompanyId;

    /**
     * 公司型号
     */
    private String equipmentCompanyInfo;

    /**
     * 质保到期时间
     */
    private Date warrantyExpiryDate;

    /**
     * 安装日期
     */
    private Long azrq;

    /**
     * 来源
     */
    private String source;

    /**
     * 平台
     */
    private String platform;

    /**
     * 指示此设备是否是由company创建的私有设备，1是，0否
     */
    private Integer isPrivate;

    /**
     * 转换为设备信息
     * @return
     */
    public EquipmentInfo toEquipmnetInfoDo() {
        EquipmentInfo equipmentInfo = new EquipmentInfo();
        equipmentInfo.setId(this.getId());
        equipmentInfo.setSbId(this.getSbId());
        equipmentInfo.setDdId(this.getDdId());
        equipmentInfo.setHouseId(this.getHouseId());
        equipmentInfo.setCompanyId(this.getCompanyId());
        equipmentInfo.setEquipmentTypeId(this.getEquipmentTypeId());
        equipmentInfo.setSbLxid(this.getSbLxid());
        equipmentInfo.setEquipmentNumber(this.getEquipmentNumber());
        equipmentInfo.setTransmitNumber(this.getTransmitNumber());
        equipmentInfo.setInstallationSite(this.getInstallationSite());
        equipmentInfo.setImages(this.getImages());
        equipmentInfo.setContacts(this.getContacts());
        equipmentInfo.setContactstel(this.getContactstel());
        equipmentInfo.setAddress(this.getAddress());
        equipmentInfo.setEquipmentCompanyId(this.getEquipmentCompanyId());
        equipmentInfo.setWarrantyExpiryDate(this.getWarrantyExpiryDate());
        equipmentInfo.setAzrq(this.getAzrq());
        equipmentInfo.setSource(this.getSource());
        equipmentInfo.setPlatform(this.getPlatform());
        equipmentInfo.setLatitude(this.getLatitude());
        equipmentInfo.setLongitude(this.getLongitude());
        equipmentInfo.setDeleted(this.getDelete());
        equipmentInfo.setGmtCreate(this.getGmtCreate());
        equipmentInfo.setGmtModified(this.getGmtModified());
        equipmentInfo.setIsPrivate(this.getIsPrivate());
        return equipmentInfo;
    }

}
